//
// Created by liushuai on 19-3-16.
//
#include "choose_sort.h"
#include <bits/stdc++.h>
using namespace std;
vector<int>& choose_sort(vector<int>& a)
{
    int min_index;
    for(int start_index = 0;start_index<a.size();start_index++)
    {
        int min_num = a[start_index];
        min_index = start_index;
        for(int index = start_index+1;index<a.size();index++)
        {
            if(a[index]<min_num)
            {
                min_num = a[index];
                min_index = index;
            }
        }
        swap(a[start_index],a[min_index]);
    }
    return a;
}
